/* by wildw1ng */

_markerWestSL = createMarker ["respawn_westSL", getMarkerPos "baseWest"];
_markerEastSL = createMarker ["respawn_eastSL", getMarkerPos "baseEast"];
_markerGuerSL = createMarker ["respawn_guerrilaSL", getMarkerPos "baseGuerrila"];

[] spawn
{
	while {true} do
	{
		if (playerSide == west) then
		{
			_unit = (leader player);
			_marker = "respawn_westSL";
			if (alive _unit) then
			{
				_marker setmarkerpos getpos _unit;
				_text = name _unit;
				_marker setMarkerText "Squad Leader: " + _text;
				_marker setMarkerType "b_inf";
				_marker setMarkerAlpha 0;
			} else {
				_marker setmarkerpos getMarkerPos "baseWest";
				_marker setMarkerText " ";
				_marker setMarkerType "Empty";
				_marker setMarkerAlpha 0;
			};
		};
		if (playerSide == east) then
		{
			_unit = (leader player);
			_marker = "respawn_eastSL";
			if (alive _unit) then
			{
				_marker setmarkerpos getpos _unit;
				_text = name _unit;
				_marker setMarkerText "Squad Leader: " + _text;
				_marker setMarkerType "o_inf";
				_marker setMarkerAlpha 0;
			} else {
				_marker setmarkerpos getMarkerPos "baseEast";
				_marker setMarkerText " ";
				_marker setMarkerType "Empty";
				_marker setMarkerAlpha 0;
			};
		};
		if (playerSide == resistance) then
		{
			_unit = (leader player);
			_marker = "respawn_guerrilaSL";
			if (alive _unit) then
			{
				_marker setmarkerpos getpos _unit;
				_text = name _unit;
				_marker setMarkerText "Squad Leader: " + _text;
				_marker setMarkerType "n_inf";
				_marker setMarkerAlpha 0;
			} else {
				_marker setmarkerpos getMarkerPos "baseGuerrila";
				_marker setMarkerText " ";
				_marker setMarkerType "Empty";
				_marker setMarkerAlpha 0;
			};
		};
		sleep 1.0;
	};
};